<?php
if($_SESSION['group_id']>2){redir("./");exit;}
$m_id=$_GET['m_id'];
$row=mysql_fetch_assoc(mysql_query("select * from member where m_id='$_GET[m_id]'"));
?>
<div class="box">
  <h2>ข้อมูลสมาชิก</h2>
  <div class="boxContent">
    <p> </p>
    <form method="post" enctype="multipart/form-data">
      <table width="99%" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td><strong>สาขา</strong></td>
          <td>
		  <?php
		  $sql="select * from branch where branch_id='$row[branch_id]'";
		  $branch=mysql_fetch_assoc(mysql_query($sql));
		  echo $branch['branch_name'];
		  ?>
		  </td>
        </tr>
		<tr>
          <td width="120"><strong>Username</strong></td>
          <td><?php echo $row['m_username'];?></td>
        </tr>
        <tr>
          <td><strong>ชื่อ-สกุล</strong></td>
          <td><?php echo $row['m_name'];?></td>
        </tr>
        <tr>
          <td><strong>หมายเลขโทรศัพท์</strong></td>
          <td><?php echo $row['m_tel'];?></td>
        </tr>
        <tr>
          <td><strong>อีเมลล์</strong></td>
          <td><?php echo $row['m_email'];?></td>
        </tr>
        <tr>
          <td><strong>รูปประจำตัว</strong></td>
          <td>
			<?php echo ($row['m_pic']!='')?"<a href=memberpic/$row[m_pic] target=_blank rel=lytebox><img src=memberpic/$row[m_pic] height=150></a>":'ยังไม่มีรูป';?>		  </td>
        </tr>
      </table>
      </form>
    </p>
  </div>
</div>